from django.urls import path

# 导入视图
# obtain_jwt_token 就是视图
# obtain_jwt_token = ObtainJSONWebToken.as_view()

from rest_framework_jwt.views import obtain_jwt_token
from apps.meiduo_admin.views.login import admin_obtain_jwt_token
from apps.meiduo_admin.views import home
from apps.meiduo_admin.views import user
urlpatterns = [
    #url(r'^api-token-auth/', obtain_jwt_token),
    #meiduo_admin/authorizations/
    # meiduo_admin/ 已经在工程的 urls里匹配过了
    # 登录的用户名和密码 就是项目1的用户名和密码
    # path('authorizations/',obtain_jwt_token)
    path('authorizations/',admin_obtain_jwt_token),

    # 获取日活的数量
    path('statistical/day_active/',home.DailyActiveView.as_view()),
    # 日下单
    path('statistical/day_orders/',home.DailyOrderCountAPIView.as_view()),
    # 月增用户
    path('statistical/month_increment/',home.MonthAPIView.as_view()),

    #############user管理
    path('users/',user.UserAPIView.as_view()),
]